#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "authentification.h"


void authentification(char login[20],char pwd[20])
{
char init_pwd_admin[5][6]={"1234a","1234b","1234c","1234d","1234f"};
char init_pwd_personnel[5][6]={"9876a","9876b","9873c","9876d","9876e"};
int i,j;
char c;

printf("donner votre login\n");
scanf("%s",login);

printf("donner votre code\n");
scanf("%s",pwd);
printf("le mot de passe est %s ",pwd);


for(i=0;i<5;i++)
{
if(strcmp(init_pwd_admin[i],pwd)==0)
{ printf("bienvenu admin\n");}
else if (strcmp(init_pwd_personnel[i],pwd)==0)
{
printf("bienvenu admin\n");
}
else
{
j--;
printf("saisie incorrecte !! il vous reste %d essais \n",j);
}
break;
}

}
